When it comes to computer generated images, modern operating systems (OS) generate rich user graphic interfaces (GUI). The algorithms used today for drawing a GUI on the user display (i.e., monitor) continue to generate increasingly high quality images as the corresponding processing speed and related image processing applications continue to increase in quality.
The current GUIs of any version of Windows®, Linux®, Apple®, Android®, etc., are composed of thousands of images coupled together. The present GUIs continue to require the management of increasingly more memory resources. One common technique used to perform image processing is referred to as double buffering. This particular buffering technique is used to avoid image degradation and display problems, such as image flickering and image tearing.
Double buffering and other similar data processing techniques implemented by the operating system (OS), tend to rely on large amounts of memory to process image data. For example, when an OS performs memory allocation for any purpose, the addition and/or deletion of memory resources requires a certain amount of CPU utilization. In some cases, memory and/or CPU usage may be significant enough to affect the performance of other applications and resources operating on the same computer.
In computer graphics, double buffering is a technique for drawing graphics while reducing flickering, tearing, and other undesired effects. It is difficult for a program to draw an image display without pixels changing more than once. For instance, in order to update a page of text it is easier to clear the entire page and then begin inserting the letters rather than erasing all the pixels that are not in both the old and new letters. However, the intermediate work-in-progress images are observed by the user as image flickering. In addition, computer monitors constantly redraw the visible video page at about 60 times a second (i.e., 60 Hz refresh rate), so even a perfect update may be visible momentarily as having a horizontal divider between the “new” image and the un-redrawn “old” image, which is referred to as image tearing.
Double buffering operates by having all drawing operations store their results in some region of system random access memory (RAM), referred to as a “back buffer.” When all drawing operations are complete, the whole region, or only the changed portion, is copied into the video RAM or “front buffer.” This copying procedure is usually synchronized with the monitor's raster beam in order to avoid image tearing. However, double buffering requires more video memory and CPU time than single buffering due to the video memory allocated for the back buffer, the time for the copy operation, and the time waiting for synchronization. Furthermore, compositing window managers often combine the “copying” operation with “compositing”, which is used to position windows and transform them with scale or warping effects and make certain portions transparent. As a result, the “front buffer” may contain only the composite image seen on the screen, while there is a different “back buffer” occupying additional memory for every window containing the non-composited image of the entire window contents.